import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'sunmi_status_light_manager_method_channel.dart';
import 'sunmi_status_light_manager.dart';

abstract class SunmiStatusLightManagerPlatform extends PlatformInterface {
  /// Constructs a SunmiStatusLightManagerPlatform.
  SunmiStatusLightManagerPlatform() : super(token: _token);

  static final Object _token = Object();

  static SunmiStatusLightManagerPlatform _instance = MethodChannelSunmiStatusLightManager();

  /// The default instance of [SunmiStatusLightManagerPlatform] to use.
  ///
  /// Defaults to [MethodChannelSunmiStatusLightManager].
  static SunmiStatusLightManagerPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [SunmiStatusLightManagerPlatform] when
  /// they register themselves.
  static set instance(SunmiStatusLightManagerPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  /// 初始化状态灯管理器
  Future<bool> initialize() {
    throw UnimplementedError('initialize() has not been implemented.');
  }

  /// 设置状态灯颜色
  Future<bool> setColor(StatusLightColor color) {
    throw UnimplementedError('setColor() has not been implemented.');
  }

  /// 关闭状态灯
  Future<bool> turnOff() {
    throw UnimplementedError('turnOff() has not been implemented.');
  }

  /// 设置单色闪烁
  Future<bool> setFlashing(StatusLightColor color, int onMs, int offMs) {
    throw UnimplementedError('setFlashing() has not been implemented.');
  }

  /// 设置多色闪烁
  Future<bool> setMultiFlashing(
    List<StatusLightColor> colors,
    List<int> onMs,
    List<int> offMs,
  ) {
    throw UnimplementedError('setMultiFlashing() has not been implemented.');
  }

  /// 销毁状态灯管理器
  Future<bool> destroy() {
    throw UnimplementedError('destroy() has not been implemented.');
  }
}
